﻿CREATE FUNCTION [dbo].[fn_ColumnIsComputed]
(
	@Table   sysname,
	@Column  sysname
)
RETURNS BIT
AS
BEGIN
	RETURN (
	    SELECT c.is_computed
	    FROM   sys.[columns] c
	           INNER JOIN sys.tables t
	                ON  c.[object_id] = t.[object_id]
	    WHERE  t.[name] = @Table
	           AND c.[name] = @Column
	           AND t.[type] = 'U'
	)
END